#!/bin/bash
sonic3d_path=`dirname "$0"`
cd "$sonic3d_path/../../"
if [ ! -d ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/ ]
then
mkdir ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/
fi

if [ ! -f ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/eduke32.cfg ]
then
cp Contents/Resources/eduke32.cfg ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/eduke32.cfg
fi

if [ ! -f ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/settings.cfg ]
then
cp Contents/Resources/settings.cfg ~/Library/Application\ Support/Sonic\ the\ Hedgehog\ 3D/settings.cfg
fi

Contents/MacOS/eduke32_sonic3d -g data.grp
